package a_airwar;

public class Bullet extends FlyObj {
    private int speed;

    //子弹出现的位置有飞机决定
    public Bullet(int x, int y) {
        //x->飞机的x
        //y->飞机的y
        super(x, y, JFrameMain.bullet,1);
        speed = 5;
    }

    @Override
    public void move() {
        this.setY(getY() - speed);
    }



   /* public Bullet(int x, int y) {
        this.image = JFrameMain.bullet;
        this.x = x;
        this.y = y;
        speed = 10;
    }
    @Override
    public void move() {
        y -= speed;
    }*/
}
